package cc.iotkit.data.mapper;

import cc.iotkit.data.model.TbSysMenu;
import cc.iotkit.model.system.SysMenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: 石恒
 * @Date: 2023/7/26 8:07
 * @Description:
 */
@Mapper
public interface SysMenuMapper extends BaseMapper<TbSysMenu> {
    List<String> selectMenuPermsByRoleId(@Param("roleId") Long roleId);

    List<TbSysMenu> selectMenuTreeByUserId(@Param("userId") Long userId);

    List<String> selectMenuPermsByUserId(@Param("userId") Long userId);

    List<TbSysMenu> selectMenuList(@Param("menu") SysMenu menu, @Param("userId") Long userId);

    List<Long> listParentIdByRoleId(@Param("roleId") Long roleId);

    List<Long> selectMenuListByRoleId(@Param("roleIds") List<Long> roleIds, @Param("menuCheckStrictly") boolean menuCheckStrictly, @Param("parentRoleId") Long parentRoleId);
}
